unit PEdtForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, PChildPngForm;

type
  TEdtForm = class(TChildPngForm)
    Edit: TEdit;
    procedure FormCreate(Sender: TObject);
    procedure EditKeyPress(Sender: TObject; var Key: Char);
  private
    { Private declarations }
  public
    procedure CMDialogKey( var msg: TCMDialogKey ); message CM_DIALOGKEY;
    function getText: String;
    procedure setText(text: String);
  end;

var
  EdtForm: TEdtForm;

implementation

uses PAuthorizationForm;

{$R *.dfm}

procedure TEdtForm.FormCreate(Sender: TObject);
begin
  SetClassLong(Self.Handle,GCL_STYLE,WS_EX_TRANSPARENT);
end;

procedure TEdtForm.EditKeyPress(Sender: TObject; var Key: Char);
var i: Integer;
begin
  inherited;

  if (Key = Chr(9)) then
    for i := 0 to Length(AuthorizationForm.getArrayChilds) - 1 do
      if (AuthorizationForm.getArrayChilds[i].ClassName = 'TEdtForm') and (AuthorizationForm.getArrayChilds[i] <> Self) then
        AuthorizationForm.getArrayChilds[i].SetFocus;

  if (Key = Chr(13)) then

end;
        
procedure TEdtForm.CMDialogKey(var msg: TCMDialogKey);
begin
  //
end;

function TEdtForm.getText: String;
begin
  Result := Edit.Text;
end;

procedure TEdtForm.setText(text: String);
begin
  Edit.Text := text;
end;

end.
